package com.nhncorp.pleiades.ens;

import java.io.Serializable;

public class EventMessage implements Serializable{
  
  private static final long serialVersionUID = 1L;
  private String hostName;
  private int eventType;
  private String lockId;
  private boolean isDirectory;
  private long generationNumber;
  
  public EventMessage(){
    hostName = "";
    eventType = 0;
    lockId = "";
    isDirectory = false;
    generationNumber = 0;
  }
  
  public EventMessage(String name, int type, String id, boolean isDir, long number) {
    hostName = name;
    eventType = type;
    lockId = id;
    isDirectory = isDir;
    generationNumber = number;
  }

  public int getEventType() {
    return eventType;
  }

  public void setEventType(int eventType) {
    this.eventType = eventType;
  }

  public long getGenerationNumber() {
    return generationNumber;
  }

  public void setGenerationNumber(long generationNumber) {
    this.generationNumber = generationNumber;
  }

  public String getHostName() {
    return hostName;
  }

  public void setHostName(String hostName) {
    this.hostName = hostName;
  }

  public String getLockId() {
    return lockId;
  }

  public void setLockId(String lockId) {
    this.lockId = lockId;
  }
  
  public boolean getIsDirectory() {
    return this.isDirectory;
  }
  
  public void setIsDirectory(boolean isDir) {
    this.isDirectory = isDir;
  }
  
  public String toString() {
    return (this.hostName + "," + this.lockId + "," + this.eventType + "," + this.generationNumber);
  }

}
